<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  watch:{
    $route(to){
      if(to.path != "/login"){  //解决直接用导航访问页面时不添加标签问题
        let obj = {
          name:to.name,
          title:to.meta.title
        }
        this.$store.commit("addTab",obj);
      }
    }
  }
}
</script>

<style>
#app {
  height: 100%;
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
